<template>
	<view>
		<nav-bar color="#000000" bgc='#f1f1f1' bbtn>物流跟踪</nav-bar>
		<view class="section-1">
			<view class="company">
				<text class="text-1">承运公司：</text>
				<text class="text-2">{{name}}</text>
			</view>
			<view class="orderNum">
				<text class="text-1">运单号：</text>
				<text class="text-2">{{no}}</text>
			</view>
		</view>
		<view class="section-2">
			<view class="step" v-for="(item, i) in list">
				<view class="dot"><image src="../../static/image/order/icon_ylj@3x.png" mode=""></image></view>
				<view class="message">
					<text class="title"></text>
					<text>{{item.status}}</text>
					<text>{{item.time}}</text>
				</view>
			</view>
		</view>
	</view>
</template>
<script>
export default {
	data() {
		return {
			name: '',
			no: '',
			list: []
		};
	},
	methods: {
		getData(){
			this.ajaxJson('getPostInfo', {post_no:this.no}, res => {
				console.log(res);
				this.list = res.result.list
			});
		}
	},
	onLoad(options) {
		this.no = options.no
		this.name = options.name
		this.getData()
	}
};
</script>
<style lang="scss" scoped>
	page {
		background: #F4F4FA;
		margin-bottom: 160rpx;
	}
* {
	padding: 0;
	margin: 0;
	font-size: 0.75rem;
	box-sizing: border-box;
}

.section-1{
	background-color: #ffffff;
	width: 90%;
	margin: 120rpx auto 0;
	padding: 20rpx;
	border-radius: 20rpx;
	display: flex;
	flex-direction: column;
	.text-1{
		// border: 1px red solid;
		margin-right: 10rpx;
		font-size: 32rpx;
		font-weight: bold;
	}
	.company{
		margin-bottom: 20rpx;
	}
}
.section-2 {
	margin: 110rpx auto 0;
	width: 80%;
}
.step {
	padding: 0 10rpx;
	position: relative;
	border-left: 3px #ff957b solid;
	.dot {
		width: 60rpx;
		height: 60rpx;
		position: absolute;
		left: -0.05rem;
		top: 0;
		border: 3px #ff957b solid;
		border-radius: 60rpx;
		transform: translate(-50%, -50%);
		background: #ff957b;
		image{
			width: 100%;
			height: 100%;
		}
	}
	.message {
		margin-left: 50rpx;
		padding-bottom: 30rpx;
		display: flex;
		flex-direction: column;
		.title {
			font-size: 32rpx;
			font-weight: bold;
		}
	}
}
</style>
